package com.liu.cloud.controller;

import com.liu.cloud.fiegn.RemoteStockFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author LIU
 * @version 1.0
 * @description: 集成sentinel降级
 * @date 2023/6/18 12:49
 */
@RestController
@RequestMapping("/feign")
public class FeignController {

    /**
     * 注入feign接口调用
     */
    @Autowired
    RemoteStockFeignService stockFeignService;


    @RequestMapping("/add")
    public String add() {
        System.out.println("下单成功");
        String msg = stockFeignService.reduce2();
        return "下单成功 " + msg;
    }


}
